//
//  SearchTableViewCell.m
//  WhereToTravel
//
//  Created by dlios on 15/10/20.
//  Copyright © 2015年 zhoushengmin. All rights reserved.
//

#import "SearchTableViewCell.h"

#define W self.contentView.frame.size.width/375
#define H self.contentView.frame.size.height/100

@implementation SearchTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    [super createView];
    self.upImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.upImageView];
    
    self.upLabel.font = [UIFont boldSystemFontOfSize:18];
    
    self.mistLabel.font = [UIFont systemFontOfSize:16];
    
    self.downLeftLabel.font = [UIFont systemFontOfSize:15];
    
    self.downRightLabel.font = [UIFont systemFontOfSize:15];
}

- (void)layoutSubviews {
    self.upImageView.frame = CGRectMake(5 * W, 5 * H, W * 100, H * 90);
    self.upLabel.frame = CGRectMake(W * 110, H * 10, W * 260, H * 35);
    self.mistLabel.frame = CGRectMake(W * 110, H * 45, W * 260, H * 25);
    self.downLeftLabel.frame = CGRectMake(W * 110, H * 70, W * 160, H * 25);
    self.downRightLabel.frame = CGRectMake(W * 270, H * 70, W * 160, H * 25);
}


@end
